<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL" %>
<%@page import="java.util.Locale" %>
<%@page import="avicit.platform6.api.session.SessionHelper" %>
<%@page import="java.util.HashMap" %>
<%@page import="java.util.Iterator" %>
<%@page import="java.util.Map" %>
<%@page import="java.util.List" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="avicit.platform6.commons.utils.ViewUtil" %>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>字段对应设置</title>
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess" %>
    <%
        Object lang = session
                .getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
        String languageCode = "zh_CN";
        if (lang != null) {
            languageCode = lang.toString();
        }
        Locale locale = SessionHelper.getLocaleByUser(request);
    %>
    <jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <script type="text/javascript" src="avicit/im/lantop/basic/fieldmapset/LantopFieldMapSetItem.js"></script>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/im/lantop/basic/fieldmapset/locale/language_<%=languageCode%>.js"></script>
    <link href="static/css/custom/lantop/css/custom.css" type="text/css" rel="stylesheet">
    <script type="text/javascript">
    </script>
</head>
<body class="easyui-layout" data-options="fit:false">
<script type="text/javascript">
    var baseurl = '<%=request.getContextPath()%>';
    var dialogId = "${dialogId}"; //打开页面传递的模块ID
    $(function () {
        setComboWidths();
        refTgtNode("@@");
        sysId = "${sysId}";//系统标识
        flag = "${flag}";// 添加，编辑标识（添加'add' 编辑'edit'
        type = "${type}";//源库表类型（Y 真实表 N 虚拟表 ）
        tgtTableId = "${tgtTableId}";//编辑或公共字段时，目标表ID
        tgtTableLable = "${tgtTableLable}";//目标表中文名
        sourceTableId = "${sourceTableId}";//源表ID
        sourceTableLable = "${sourceTableLable}";//源表中文名
        tgtClassNodeId = "${tgtClassNodeId}";//编辑时目标节点ID，添加时为空字符串
        sourceTableName = "${sourceTableName}";//源库表名
        orgId = "${orgId}";
        orgType = "${orgType}";
        nodeId = "${nodeId}";
        tgtTabTypeForSave = type;
        tgtTabNameForSave = sourceTableName;

        $('#ykb').combotree({
            url: 'platform/LantopFieldMapSetController/fieldMapSetTree?type=' + type + '&flag=' + flag  + '&sOrt=s' + "&sourceTableId=" + sourceTableId,
            loadFilter: function (data) {
                if (data.data) {
                    return data.data;
                } else {
                    return data;
                }
            },
            onClick: function (node) {
                //刷新目标库表表格
                refTable($('#mbkb').combobox('getValue'), node.attributes.ID, $('#mbjd').combobox('getValue'), "lantopTgtDataGrid", "tgt");
                //刷新目标节点
                if (tgtTabTypeForSave == "N") {
                    if (tgtTabNameForSave == "LANTOP_PUB_FIELD") {
                        refTgtNode("");
                    } else {
                        refTgtNode(node.attributes.ID);
                    }
                } else {
                    refTgtNode($('#mbkb').combobox('getValue'));
                }
                //源库表不能选择公共字段表`
                if (node.attributes.IS_TRUE_TABLE == "N") {
                    $('#ykb').combotree('setValue', '');
                    refTable("@@", "", "", "lantopSourceDataGrid", "source");// 刷新源表格
                    //commonLang.tip.alert替换'提示',commonLang.optip.notSelectVirtual替换'源库表不能选择虚拟表！'
                    $.messager.alert(commonLang.tip.alert, commonLang.optip.notSelectVirtual, 'warning');
                    return false;
                }
                var archiveType = node.attributes.ARCHIVE_TYPE;
                var tableName = node.attributes.TABLE_NAME;
                if (archiveType != "-1") {
                    // $('#ykb').combotree('setValue', '');
                    // refTable("@@", "", "", "lantopSourceDataGrid", "source");// 刷新源表格
                    // commonLang.tip.alert替换'提示',commonLang.optip.selectPhysics替换'请选择物理表！'
                    $.messager.alert(commonLang.tip.alert, commonLang.optip.selectPhysics, 'warning');
                    return false;
                }
                if ("LANTOP_ARC_BOX_CATA" == tableName) {
                    //目标库表选择盒目录时
                    if ($('#mbkb').combobox('getText') != "盒目录" && $('#mbkb').combobox('getText') != null && $('#mbkb').combobox('getText') != "") {
                        //如果原库没有选择盒目录
                        ('#ykb').combotree('setValue', '');
                        refTable("@@", "", "", "lantopSourceDataGrid", "source");// 刷新源表格
                        //commonLang.tip.alert替换'提示',commonLang.optip.notBoxCatalog替换'目标库表不为“盒目录”时，源库表不能选择“盒目录”！'
                        $.messager.alert(commonLang.tip.alert, commonLang.optip.notBoxCatalog, 'warning');
                        return false;
                    }
                } else {
                    if ($('#mbkb').combobox('getText') == "盒目录") {
                        $('#ykb').combotree('setValue', '');
                        refTable("@@", "", "", "lantopSourceDataGrid", "source");// 刷新源表格
                        //commonLang.tip.alert替换'提示',commonLang.optip.boxCatalog替换'目标库表为“盒目录”时，源库表必须选择“盒目录”！'
                        $.messager.alert(commonLang.tip.alert, commonLang.optip.boxCatalog, 'warning');
                        return false;
                    }
                }
                //刷新源库表表格
                refTable(node.attributes.ID, $('#mbkb').combobox('getValue'), "", "lantopSourceDataGrid", "source");
            }
        });
        // }

        //加载目标库表
        $('#mbkb').combotree({
            url: 'platform/LantopFieldMapSetController/fieldMapSetTree?type=' + type + '&orgId=' + orgId + '&orgType=' + orgType + '&flag=' + flag + '&sOrt=t',
            loadFilter: function (data) {
                if (data.data) {
                    return data.data;
                } else {
                    return data;
                }
            },
            onClick: function (node) {
                //刷新源库表表格
                refTable(sourceTableId, node.attributes.ID, "", "lantopSourceDataGrid", "source"); //sourceTableId       ----$('#ykb').combobox('getValue')
                var archiveType = node.attributes.ARCHIVE_TYPE;
                var tableName = node.attributes.TABLE_NAME;
                tgtTabTypeForSave = node.attributes.IS_TRUE_TABLE;
                tgtTabNameForSave = tableName;
                if (archiveType != "-1") {
                    $('#mbkb').combotree('setValue', '');
                    $("#mbjd").combotree('setValue', '');
                    refTable("@@", "", "", "lantopTgtDataGrid", "tgt");// 刷新目标表格
                    //commonLang.tip.alert替换'提示',commonLang.optip.selectPhysics替换'请选择物理表！'
                    $.messager.alert(commonLang.tip.alert, commonLang.optip.selectPhysics, 'warning');
                    //控制目标节点下拉框权限
                    tgtNodeComboControl();
                    return false;
                }
                if ("LANTOP_ARC_BOX_CATA" == tableName) {
                    //目标库表选择盒目录时
                    if ($('#ykb').combobox('getText') != "盒目录" && $('#ykb').combobox('getText') != null && $('#ykb').combobox('getText') != "") {
                        //如果原库没有选择盒目录
                        $('#mbkb').combotree('setValue', '');
                        $("#mbjd").combotree('setValue', '');
                        refTable("@@", "", "", "lantopTgtDataGrid", "tgt");// 刷新目标表格
                        //commonLang.tip.alert替换'提示',commonLang.optip.sourceNotBox替换'源库表不为“盒目录”时，目标库表不能选择“盒目录”！'
                        $.messager.alert(commonLang.tip.alert, commonLang.optip.sourceNotBox, 'warning');
                        //控制目标节点下拉框权限
                        tgtNodeComboControl();
                        return false;
                    }
                } else {
                    if ($('#ykb').combobox('getText') == "盒目录") {
                        //如果原库没有选择盒目录
                        $('#mbkb').combotree('setValue', '');
                        $("#mbjd").combotree('setValue', '');
                        refTable("@@", "", "", "lantopTgtDataGrid", "tgt");// 刷新目标表格
                        //commonLang.tip.alert替换'提示',commonLang.optip.sourceBox替换'源库表为“盒目录”时，目标库表必须选择“盒目录”！'
                        $.messager.alert(commonLang.tip.alert, commonLang.optip.sourceBox, 'warning');
                        //控制目标节点下拉框权限
                        tgtNodeComboControl();
                        return false;
                    }
                }
                //刷新目标库表表格
                refTable(node.attributes.ID,sourceTableId, $('#mbjd').combobox('getValue'), "lantopTgtDataGrid", "tgt"); // $('#ykb').combobox('getValue')
                //刷新目标节点
                if (tgtTabTypeForSave == "N") {
                    if (tgtTabNameForSave == "LANTOP_PUB_FIELD") {
                        refTgtNode("");
                    } else {
                        refTgtNode(sourceTableId); //$('#ykb').combobox('getValue')
                    }
                } else {
                    refTgtNode(node.attributes.ID); //node.attributes.ID
                }
            }
        });

        if (sourceTableId != "") {//如果存在源表ID
            $('#ykb').combotree('setValue', sourceTableId);
            //去掉颜色
            var value = $('#ykb').combotree('getText');
            value = value.replace("<font color='red'>", "");
            value = value.replace("</font>", "");
            //根据表id查询表中文名
            var tableTitle = "";
            $.ajax({
                url: 'platform/deptdocarrangeController/getSourceName',
                data: {
                    id: nodeId
                },
                type: 'post',
                dataType: 'json',
                success: function (result) {
                    $("#ykb").combobox({
                        data: result,
                        valueField: "ID",
                        textField: "TABLE_TITLE",
                        panelHeight: "auto",
                        onSelect: function (obj) {
                            var objs = obj;
                            if (objs != null) {
                                sourceTableId = objs.ID;
                                refTable(sourceTableId, tgtTableLable, "", "lantopSourceDataGrid", "source");
                            }
                        },
                        onLoadSuccess: function () {
                            var data = $('#ykb').combobox('getData');
                            if (data.length > 0) {
                                $('#ykb').combobox('select', data[0].TABLE_TITLE);
                            }
                            if(data.length<2){
								$('#ykb').combobox('readonly');
							}
                        }
                    })
                },
                async: false
            });
        }
        if (tgtTableId != "") {//如果存在目标库表ID
            $('#mbkb').combotree('setValue', tgtTableId);
            //刷新目标节点
            if (tgtTabTypeForSave == "N") {
                if (tgtTabNameForSave == "LANTOP_PUB_FIELD") {
                    refTgtNode("");
                } else {
                    refTgtNode(sourceTableId);
                }
            } else {
                refTgtNode(tgtTableId);
            }
        }
        if (tgtClassNodeId != "") {//如果存在目标节点ID
            $('#mbjd').combotree('setValue', tgtClassNodeId);
        }
        //刷新源表
        refTable(sourceTableId, tgtTableLable, "", "lantopSourceDataGrid", "source");
        //刷新目标表
        refTable(tgtTableId, sourceTableId, tgtClassNodeId, "lantopTgtDataGrid", "tgt");
        //判断是否为公共字段
        if (type == "N") {
            $('#mbjd').combobox('disable');
        }
        //判断是否为编辑
        if (flag == "edit") {
            $('#ykb').combobox('disable');
            $('#mbkb').combobox('disable');
            $('#mbjd').combobox('disable');
        } else {
            if (type == "Y") {
                //$('#ykb').combobox('disable');
            } else {
                $('#mbkb').combobox('disable');
                $('#mbjd').combobox('disable');
            }
        }
        onShowTgt();// 去掉目标库表颜色
        onShowsorce();//去掉源库表颜色
        tgtNodeComboControl();//控制目标节点下拉框权限



        /**
         * 刷新目标节点方法
         */
        function refTgtNode(id) {
            // 加载目标节点
            $('#mbjd').combotree({
                url: 'platform/CdImportController/getTgtNodeData?id=' + id,
                loadFilter: function(data) {
                    if (data.data) {
                        return data.data;
                    } else {
                        return data;
                    }
                },
                onClick: function(node) {
                    var nodeType = node.attributes.ARCHIVE_CLASS_NODE_TYPE;
                    if (nodeType != "2") {
                        $('#mbjd').combotree('setValue', '');
                        alert(commonLang.optip.select.dateNode);/*请选择数据节点*/
                    }
                    var tgtNodeId = $('#mbjd').combobox('getValue');
                    var tgtTableId = $('#mbkb').combobox('getValue');
                    // var sourceTableId = $('#ykb').combobox('getValue');
                    // 刷新目标库表表格
                    refTable(tgtTableId, sourceTableId, tgtNodeId,
                        "lantopTgtDataGrid", "tgt");
                    // 刷新源库表表格
                    refTable(sourceTableId, tgtTableId, "",
                        "lantopSourceDataGrid", "source");
                }
            });
        }
    });

    /**
     * 设置‘目标库表’，‘目标节点’下拉列表宽度
     */
    function setComboWidths() {
        var clientWidth = document.body.clientWidth;// 获取当前屏幕宽度
        if (clientWidth > 1100) {
            document.getElementById("mbkb").style.width = "200px";
            document.getElementById("mbjd").style.width = "200px";
        } else {
            document.getElementById("mbkb").style.width = "100px";
            document.getElementById("mbjd").style.width = "100px";
        }
    }


    
</script>
<style>
    /*.combo-panel {*/
    /*    border: 1px solid #dedede;*/
    /*    overflow-x: auto;*/
    /*}*/

    /*.datagrid-view2 {*/
    /*    border-right: 1px solid #dedede !important;*/
    /*}*/

    /*.datagrid-header-inner, .datagrid-htable {*/
    /*    width: 100%;*/
    /*}*/

</style>
</head>
<body class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',fit:false" style="overflow: hidden;padding:10px 20px;">
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_autoSet">
        <%-- 自动对应 --%>
        <a class="easyui-linkbutton selbtn" onclick="autoSet();" href="javascript:void(0);" id="autoSet">
            <img src="avicit/im/lantop/common/search/image/icon-1028.png">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.autoMap", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_clearSet">
        <%-- 取消对应 --%>
        <a class="easyui-linkbutton selbtn" onclick="clearSet();" href="javascript:void(0);" id="clearSet">
            <img src="avicit/im/lantop/common/search/image/icon-1026 .png">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.cancelMap", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_addSet">
        <%-- 加入对应 --%>
        <a class="easyui-linkbutton selbtn" onclick="addSet();" href="javascript:void(0);" id="addSet">
            <img src="avicit/im/lantop/common/search/image/icon-1029.png">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.addMap", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_deleteSet">
        <%-- 去除对应 --%>
        <a class="easyui-linkbutton selbtn" onclick="deleteSet();" href="javascript:void(0);" id="deleteSet">
            <img src="avicit/im/lantop/common/search/image/icon-1027.png">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.deleteMap", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
</div>
<div data-options="region:'center'" style="height: 0; overflow: hidden; font-size: 0;">
    <div class="easyui-layout" data-options="fit:true">
        <div data-options="region:'west'" style="width: 590px;">
            <div class="easyui-layout" data-options="fit:true">
                <div data-options="region:'north'" style="height: 40px; overflow-y: hidden;">
                    <form id="formAdd" method="post">
                        <div class="formExtendBase" style="margin:10px auto;">
                            <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_formAdd_ykb">
                                <div class="formUnit column1">
                                        <%-- 源库表 --%>
                                    <label for="ykb"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.sourceTable", "i18n.lantop", locale)%>
                                        ：</label>
                                    <div class="inputContainer">
                                        <input class="easyui-combotree" name="ykb" id="ykb" style="width: 150px;"
                                               title="目标库表"
                                               data-options="onHidePanel:onShowsorce,editable:false,onShowPanel:comboboxOnShowPanel"/>
                                    </div>
                                </div>
                            </sec:accesscontrollist>
                        </div>
                    </form>
                </div>
                <div data-options="region:'center'">
                    <table id="lantopSourceDataGrid" class="easyui-datagrid"
                           data-options="
								rownumbers: true,
								animate: true,
								collapsible: false,
								fitColumns: true,
								scrollbarSize:0,
								autoRowHeight: false,
								singleSelect: false,
					    		striped:true,
								fit:true,
								method: 'post'">
                        <thead>
                        <tr>
                            <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_datagrid_ID">
                                <th data-options="field:'ID', halign:'center',checkbox:true" title="主键ID">主键ID</th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_LABEL">
                                <%-- 字段中文名 --%>
                                <th data-options="field:'COL_LABEL', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                                    width="155px"
                                    title="字段中文名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table.fieldCHNName", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_NAME">
                                <%-- 字段名 --%>
                                <th data-options="field:'COL_NAME', halign:'center', align:'center', sortable:false"
                                    width="155px"
                                    title="字段名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table.fieldName", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_TYPE">
                                <%-- 字段类型 --%>
                                <th data-options="field:'COL_TYPE', halign:'center', align:'center', sortable:false,formatter:fomaterColType"
                                    width="155px"
                                    title="字段类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table.fieldType", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_LENGTH">
                                <%-- 长度 --%>
                                <th data-options="field:'COL_LENGTH', halign:'center', align:'center', sortable:false"
                                    width="155px"
                                    title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table.length", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>

        <div data-options="region:'center'" style="height: 0; overflow: hidden; font-size: 0;">
            <div class="easyui-layout" data-options="fit:true">
                <div data-options="region:'north'" style="height: 40px; overflow-y: hidden;">
                    <form id="formAdd" method="post">
                        <table style="padding-top: 5px; margin: 0 auto; width: 100%;">
                            <tr>
                                <sec:accesscontrollist hasPermission="3"
                                                       domainObject="LantopFieldMapSetItem_formAdd_mbkb">
                                    <%-- 目标库表 --%>
                                    <td align="right" style="width: 70px;"><span
                                            class=""></span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.targetTable", "i18n.lantop", locale)%>
                                        ：
                                    </td>
                                    <td id="1"><input class="easyui-combotree" name="mbkb" id="mbkb" title="目标库表"
                                                      data-options="onHidePanel:onShowTgt, editable:false,onShowPanel:comboboxOnShowPanel,panelHeight:260"/>
                                    </td>
                                </sec:accesscontrollist>
                                <sec:accesscontrollist hasPermission="3"
                                                       domainObject="LantopFieldMapSetItem_formAdd_mbjd">
                                    <%-- 目标节点 --%>
                                    <td align="right" style="width: 70px;"><span
                                            class=""></span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.targetNode", "i18n.lantop", locale)%>
                                        ：
                                    </td>
                                    <td id="2">
                                        <select class="easyui-combotree" name="mbjd" id="mbjd" title="目标节点"
                                                       data-options="editable:false,onShowPanel:comboboxOnShowPanel,valueField:'ID',textField:'ARCHIVE_CLASS_NODE_NAME'">
                                    </select>
                                    </td>
                                </sec:accesscontrollist>
                            </tr>
                        </table>
                    </form>
                </div>
                <div data-options="region:'center'">
                    <table id="lantopTgtDataGrid" class="easyui-datagrid"
                           data-options="
								rownumbers: true,
								animate: true,
								collapsible: false,
								fitColumns: true,
								scrollbarSize:0,
								autoRowHeight: false,
								singleSelect: false,
					    		striped:true,
								fit:true,
								method: 'post'
							">
                        <thead>
                        <tr>
                            <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_datagrid_ID">
                                <th data-options="field:'ID', halign:'center',checkbox:true" title="主键ID" width="20px;">
                                    主键ID
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_ATTRIBUTE_03">
                                <th data-options="field:'ATTRIBUTE_03',editor:{type:'text'},hidden:true" width="120px;"
                                    title="源字段ID">源字段ID
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_SOURCE_COL_LABEL">
                                <%-- 源字段 --%>
                                <th data-options="field:'SOURCE_COL_LABEL', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                                    width="120px;"
                                    title="源表名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table2.sourceField", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_LABEL">
                                <%-- 目标字段 --%>
                                <th data-options="field:'COL_LABEL', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                                    width="120px;"
                                    title="目标表名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table2.targetField", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_NAME">
                                <%-- 字段名 --%>
                                <th data-options="field:'COL_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                                    width="120px;"
                                    title="字段名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table2.fieldName", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_TYPE">
                                <%-- 字段类型 --%>
                                <th data-options="field:'COL_TYPE', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterColType"
                                    width="120px;"
                                    title="字段类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table2.fieldType", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                            <sec:accesscontrollist hasPermission="3"
                                                   domainObject="LantopFieldMapSetItem_datagrid_COL_LENGTH">
                                <%-- 长度 --%>
                                <th data-options="field:'COL_LENGTH', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                                    width="120px;"
                                    title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.table2.length", "i18n.lantop", locale)%>
                                </th>
                            </sec:accesscontrollist>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div data-options="region:'south'" style="padding:15px 20px;text-align:center;">
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_save">
        <%-- 保存 --%>
        <a class="easyui-linkbutton selbtnc" iconCls="icon-im-save" onclick="save();" href="javascript:void(0);"
           id="save" style="margin-right:20px;">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.save", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
    <sec:accesscontrollist hasPermission="3" domainObject="LantopFieldMapSetItem_button_back">
        <%-- 返回 --%>
        <a class="easyui-linkbutton selbtnc" iconCls="icon-im-back" onclick="closeWindows();" href="javascript:void(0);"
           id="back">
            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.fieldmapset.table.button.setMap.button.return", "i18n.lantop", locale)%>
        </a>
    </sec:accesscontrollist>
</div>
</body>
<script type="text/javascript" src="static/js/platform/index/js/divscroll.js"></script>
<script>
    $(function () {
        $(".datagrid-view2").find(".datagrid-body").perfectScrollbar();
    });

    function closeWindows() {
        if (parent != null && parent.$('#' + dialogId) != null) {
            parent.$('#' + dialogId).dialog('close');
        }
    }
</script>

</html>
